package
{
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.*;
	import flash.net.*;
	
	[SWF (frameRate="30",backgroundColor="#e8e3dd")]

	public class pspNav extends Sprite
	{
		private var stageWidth:int;
		private var stageHeight:int;
		
		public var foo:Sprite = new Sprite();
		public var _url:String = "asset/nav.xml";
		public var _xmlList:XMLList ;
		
		
		public function pspNav()
		{
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stageWidth = stage.stageWidth;
			stageHeight = stage.stageHeight;
			
			this.addChild(foo);
			var bg_image:Background = new Background(stageWidth,stageHeight);
			foo.addChild(bg_image);
			
			var xmlLoader:URLLoader = new URLLoader();
			xmlLoader.addEventListener(Event.COMPLETE,loadXML);
			
			var xml_url:URLRequest = new URLRequest(_url);
			xmlLoader.load(xml_url);
		}
		private function initPages(_xmlList:XMLList):void
		{
		}
		
		private function loadXML(e:Event):void{
			var xmlData:XML = new XML(e.target.data);
			_xmlList = xmlData.Page;
			//initPages(_xmlList);
			//trace(_xmlList);
		}
	}
}